home *** CD-ROM | disk | FTP | other *** search
/ Shareware Super Platinum 8 / Shareware Super Platinum 8.iso / mac / WIN_PRO / DDEIO.ZIP;1 / TEST.PRG < prev   
Encoding:
Text File  |  1993-11-30  |  934 b   |  46 lines

  1.  
  2. /*
  3. ** Simple test program for DDEIO.LIB
  4. ** DDEIO.LIB enables a clipper program to communicate with
  5. ** windows programs using DDE or Dynamic Data Exchnage.
  6. **
  7. ** This example establishes a conversation with the Windows
  8. ** Program Manager
  9. **      1) Creates a new group
  10. **      2) Ask for list of all groups
  11. **
  12. ** Link this program with DDEIO.LIB
  13. */
  14.  
  15.  
  16. channel = DDEInitiate("PROGMAN", "PROGMAN", 20)
  17. IF channel < 1 .OR. channel > 8 
  18.    ? "Could not open Progman Manager", channel
  19.    BREAK
  20. ENDIF
  21.  
  22. /*
  23. error_code = DDEExecute(channel, "[CreateGroup(Clipper Test)]", 30)
  24. if error_code != 0 
  25.    ? "Execute Failed", error_code
  26. ENDIF
  27. */
  28.  
  29.  
  30. groups = ""
  31.  
  32. error_code = DDERequest(channel, "Address", @groups, 30)
  33. IF error_code != 0 
  34.    ? "Execute Failed", error_code
  35. ELSE
  36.    ? "item :", groups
  37. ENDIF
  38.  
  39.  
  40.  
  41. error_code = DDETerminate(channel)
  42. if error_code != 0 
  43.    ? "Terminate return", error_code
  44. ENDIF
  45.  
  46.